MY_PATH := $(call my-dir)

LOCAL_PATH = $(MY_PATH)

include $(CLEAR_VARS)
LOCAL_CPPFLAGS:=-std=c++11 -pthread -D__STDC_LIMIT_MACROS
LOCAL_MODULE := Navigation

FILE_LIST := ../DebugUtils/Source/DebugDraw.cpp \
				../DebugUtils/Source/DetourDebugDraw.cpp \
					../DebugUtils/Source/RecastDebugDraw.cpp \
						../DebugUtils/Source/RecastDump.cpp \
			../Detour/Source/DetourAlloc.cpp \
             ../Detour/Source/DetourAssert.cpp \
			  ../Detour/Source/DetourCommon.cpp \
			   ../Detour/Source/DetourNavMesh.cpp \
			    ../Detour/Source/DetourNavMeshBuilder.cpp \
				 ../Detour/Source/DetourNavMeshQuery.cpp \
				  ../Detour/Source/DetourNode.cpp \
				  ../DetourCrowd/Source/DetourCrowd.cpp \
				  ../DetourCrowd/Source/DetourLocalBoundary.cpp \
				  ../DetourCrowd/Source/DetourObstacleAvoidance.cpp \
				  ../DetourCrowd/Source/DetourPathCorridor.cpp \
				  ../DetourCrowd/Source/DetourPathQueue.cpp \
				  ../DetourCrowd/Source/DetourProximityGrid.cpp \
					../DetourTileCache/Source/DetourTileCache.cpp \
					../DetourTileCache/Source/DetourTileCacheBuilder.cpp \
				   ../Recast/Source/Recast.cpp \
				   ../Recast/Source/RecastAlloc.cpp \
				   ../Recast/Source/RecastArea.cpp \
				   ../Recast/Source/RecastAssert.cpp \
				   ../Recast/Source/RecastContour.cpp \
				   ../Recast/Source/RecastFilter.cpp \
				   ../Recast/Source/RecastLayers.cpp \
				   ../Recast/Source/RecastMesh.cpp \
				   ../Recast/Source/RecastMeshDetail.cpp \
				   ../Recast/Source/RecastRasterization.cpp \
				    ../Recast/Source/RecastRegion.cpp \
					../Navigation/Navigation/fastlz.c \
					../Navigation/Navigation/Navigation.cpp
					
		   

LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)
					
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../DebugUtils/Include \
					$(LOCAL_PATH)/../Detour/Include \
					$(LOCAL_PATH)/../DetourCrowd/Include \
					$(LOCAL_PATH)/../DetourTileCache/Include \
					$(LOCAL_PATH)/../Recast/Include \
					$(LOCAL_PATH)/../Navigation/Navigation/Include

LOCAL_LDLIBS += -lm
LOCAL_LDLIBS += -landroid
LOCAL_LDLIBS += -llog
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++11 -fPIC -w")
include $(BUILD_SHARED_LIBRARY)
